<?php

class WsResponse{

	//attributs
	var $statusCode;
	var $statusMessage;
	var $data;


	//constructeur
	function WsResponse(){
		$this->statusMessage="";
		$this->statusCode="";
		$this->data="";
	}

	function toXml(){
		//entete xml		 		
		$xmlstr='<?xml version="1.0" encoding="UTF-8" ?>';
		$xmlstr=$xmlstr.'<result>';
		$xmlstr=$xmlstr.'<status code="'.$this->statusCode.'" message="'.$this->statusMessage.'"/>';
		$xmlstr=$xmlstr.'<data>'.$this->data.'</data>';
		$xmlstr=$xmlstr.'</result>';
		return $xmlstr;	
	}

	function setStatusCode($code){
		$this->statusCode=$code;	
	}

	function setStatusMessage($msg){
		$this->statusMessage=$msg;
	}

	function setData($d){
		$this->data=$d;
	}
}



?>
